package com.yeung.swordoffer;

import java.util.Arrays;

public class Tuple2 {
    private int[] data = new int[2];

    public Tuple2(int _1, int _2) {
        data[0] = _1;
        data[1] = _2;
    }

    public void set_1(int x) {
        data[0] = x;
    }

    public void set_2(int x) {
        data[1] = x;
    }

    public int get_1() {
        return data[0];
    }

    public int get_2() {
        return data[1];
    }

    public void sort() {
        Arrays.sort(data);
    }

}